﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LoginPanle : MonoBehaviour
{
    public InputField username;
    public InputField nickname;
    public Button loginBtn;
    // Use this for initialization
    void Start()
    {
        loginBtn.onClick.AddListener(OnLoginClick);
    }
    private void OnLoginClick()
    {
        Data.ReqLogin req = new Data.ReqLogin();
        req.username = username.text;
        req.nickname = nickname.text;

        NetworkManager.Instance.Send(Protocal.Login_CMD, ProtoHelper.Serialize(req));
    }
}
